added support for open with NSString