support -f flag.