better error handling on gp run-time error