handle exceptions, pass on message to user
fully support python 3.x