handling exception if not configured properly