Added missing flag.Parse(); Cleaned up cast error message