fixed a bug when current filename doesn't contain any '/' or '\'