client improvements: added more checks, diagnostics messages