seperated out the file operation code in to seperate module