Try to change prerun and postrun to PreRunE and PostRunE and bubble up errors to main func opposed to errorQuit(). Remove all commented out code that isnt be used, and use linter tool to check for any unused functions in the project for removal.