made basic_io.go more modular