Bug fixes for outputting individual files