add logging for fatal errors - updates #16