session_write_close() when fatal error occured