Added the 'cwd' parameter to change the path of the script