Move flush up to the CGI