fixed a bug with file ext