resolved function error for file.pl. now need to fix another bug for subset1