Fix log output and parsing