switches printouts to use logging module