NEW: Add support for logging fatal errors