Issue close #19, close #18

+ added to choose the extension of the file