break out logging into its own module