fix $output logging