changed app.py to support python based errors