fix #41, add error handler for 'run'