Fix logging, don't truncate file