Put debug output in if
Updated buildscript