fix regexp filename, add option for set output directory, and add help information