Create input/output module and moved the file read and write into this module