Updated bash script, but having filename issues