diff --git a/tools/dbcheck_files_exist b/tools/dbcheck_files_exist
index 7a0f1cfe8c..1a9ec84863 100755
--- a/tools/dbcheck_files_exist
+++ b/tools/dbcheck_files_exist
@@ -1,12 +1,14 @@
#!/usr/bin/env python
import os, re, boinc_path_config
-from Boinc import database, db_mid, boinc_db
-
-def get_file_path(wu):
- return re.search('(.*)',wu.xml_doc).group(1)
+from Boinc import database, db_mid, boinc_db, configxml
database.connect()
+config = configxml.default_config().config
+
+def get_file_path(wu):
+ return os.path.join(config.upload_dir,
+ re.search('(.*)',wu.xml_doc).group(1))
print "Checking for missing input files ...\n"