better error handling when wpdb fails to load