Debug mode arg and script exit on error

-debug for debug mode
script exits if any command fails