Fix unescape, Fix logging