Updated the build_script with quite a few small changes e.g. added argument check so one argument is given otherwise the script will die.