use os.getcwd() instead of cur_dir variable