added fatal error handler