Improve the code quality, handle exceptions in workbench