Add more console.logs to get down to the problem.