Moved all of the logging out of the scripts