Replace print with logging
pep8 all I could