writelog fixes