fixed plugin build script for exception-handling