fixed a bug in getOption for equity persistance, and added exit code for script