Make error print work on Python 2