add fileMode option and dirMode option