hw02 functional, but gives wrong error message when option not -n