Accessing getTargetFile() before value is assigned, Closing #743