Fix inverted ifs when renaming log. #262