Fixed printing error message on Python 3