add flag to specify the directory to the root folder