Corrected interchanged output file names for previous/current items.