Fixed problem with the extension of the files. Added an optio to ask for the extension of the files