catching errors for invalid configfiles