reworked serial communication to be more robust

reworked the serial communication to be more robust
please remove this generic log statement to decrease to level to trace