Added log and removed text writer