fix for logging when running upgrade script