fixed file name detection