Changed all log.Fatal to return errors instead