Add -f option for selecting the output format.