Adding duplicate check to LONG file production