remove obsolete usage of session_write_close()