Fixed bug with file extensions.