Slight change to the readfile function