add logs to determine error