Fix flush problem with print writer inside includes