changed logging structure to be more in line with scriptCS