Use optparse and add debug_raw option