Add more log output, don't end the session for certain write errors.