Updated script to work for bamboo as well as local