integrated parse file name function
bug fixed