Fixed a bug with the extension of file.