Update debugging and make sure the database env vars are set before doing stuff