check if headers have been sent