Disconnected (write failed: [Errno 5] Input/output error) on Nano 33 BLE Sense

Hi I run pio monitor and then do firmware upload in a separate terminal. I am seeing this error - “Disconnected (write failed: [Errno 5] Input/output error)” . I am on Ubuntu 18.04.5 LTS.
Eror doesn’t go unless Ctrl+C done to terminate and restart of pio monitor.
Any ways I can keep running pio monitor in background?