Move serial io operation to new files. Use abstraction layer to implement puts.