Add saveAs... functions to save output according to the given extension file