Add saving logger and tests