Fix pep8

Maybe not in the scope of this PR, but better use logger.