Added write parameter to parse_cmdline