support '-o' option to change the output directory