Fixed the case where addExternal is missing the file name and the path doesn't include it as well.