check if pTagFile->read() invalidates the file before trying to read from it