use python logging module for messages instead of print()

If we're going to call this an error, we should exit with a return code other than 0.