modified readFile module