Fix option parsing.
Replace LOG macro.