currentDirectory should be pre-defined. Otherwise, there will be unrecoginzed variable error.