avoid output buffering by using stderr