Fixup readFile

 - fixed output related typos
 - added close function