Replace panics for log.fatal