Added file existance checking to the bash script.