fix the abs path in the code, automatically determine the path