Fix Logger#write behavior