print header periodically