Moving path code in the the JS from the bash script