prevents duplicate filename from overwriting existing file