detect whether logger is exists when header has been sent