adding the ability to change the file extension