adding logging to figure out JS error