Added log saving