Fixed bug with file extension