updated js to pass file path