not sure I understand the mechanics of this function. Why is the first clause of the if/else empty? Why is `os.Remove` being called twice on the same arguments?