Replace malfunctioning LOCK_EX with unique file name.