Loop: catch reconnection errors; writeLoop: only log.Print if Debug