Add the option to specify the directory for output files