Fixed error in add_path, using argstr instead of argptr, added def of function