Fixed the bug where output files would not be overwritten.