added error fatal check