Added two optional parameters to the open function

It would be nice to have a custom (and optional) success and failure function in the open function so for example, if I want to show an alert when there's no app to open a "pdf" file for example I could write a proper failure to show an alert or something else.