Improved warning of not appropriate values.
Improved error reporting.