catch all exceptions, print them and return -1
pushed version to 0.3.1