Support argument to be either file or json