Someone suggested using gflags . the different options now are handled in if else blocks.I should be able to do this better.