Improved command line flags support, added -d and -f flags, implemented flags can be passed as one flag, e.g. '-adf'