put IO Utility functions into separate module