fix logging script