add console logs to identify failure cases