Detect file stream errors in player2d