Option parsing and logging