added exception handling and start stop scripts