this check is unnecessary. the try/except below handles the case that the file doesn't exist. this also causes an unnecessary filesystem access.