added more debugging output in serial routine, and more code to debugif
almost prepared for proper testing of comms