Changed error messages to be more understandable.