actually call the flush/close methods on open output files
move schedulers to sub-package in preparation for different ones