fix ovelapping file writing and ignore identicle results