removed diagnostic messages, improved error report