better support for output files