Moved the logging into the individual files