21 improve scan serial output for linux

This changes apply only for linux, not mac, but I'm working on that