Replaced hard-coded path with generated path in bash script