Perform the database check only in debug mode #116