Is `copyFile` needed? Seems like by just changing the value of `f` the later call to `moveFileToDirectory` will suffice.