Former syntax is invalid in Python 3

Since the old >> syntax does not work for Python 3 I changed the code to write to stderr instead.