s/has_key/include/ and use less parens
incorporate les's suggestion on condensing code check for -i
fail instead of puts/exit