handle bad input gracefully and with a warning message