fix duplicate file sink problem