fix bug of script, support both abs and relative path