Adding check for usebuffer to use new file or outputpanel