changed exception printing to be more in line with Python3 standards