Fix ugly memory leak where the source file contents was not deleted