Adding proper error handling
Attempting to peek past the end of the file will give you an ErrUnexepctedEOF