Fixed some issues with saving logs