Use a python3 compatible way to write to stderr