Fix log script