updated logging script