Fixed Log writing