Fixed a bug with file extension.