More debug logs in main and spec script