bettered error messages for initResourceProvider