STABLE VERSION: about to add option to specify directory of output files