Fix error in logging from script