improved error output if ssl failed