Use logging module instead of printing stuff out