try not to vomit. db_json now creates directories found in filename var if they don't exist