This line should be ```measurementFolder = new Location(id).getAbsoluteFile()```, otherwise passing in a local path name won't work.