I actually originally put it in addFIle and addJar, and added a bunch of code to check whether the file is local (because the argument to addJar/addFile can be http, ftp, etc). Decided to move it here since all code paths go through this place.