Add some more error messages, remove the pointer cruft from the fopen line, print errno after perror