check for a valid pointer before closing file
Reword TODO.md