Added checks for invalid flags, Renamed test class file to avoid confusion with its purpose