Added code for the diff and readFile methods.