Changed cwd to getcwd for os independence