Standardize logging to stderr to use the sys.stderr.write() which is forward compatible with Python 3