Added exception handling to appengine log