returning nil when no data fetched, added logs for debug.