use logging module rather instead of print()