now using optimist for better option parsing
explicitly declare io object as global