changed open to support all arguments supported by the underlying open function