Add error logging for missing data