added more file read and write methods to file module