Some fixes using with callbacks

- Catched error if trying to open a non existent modem that causes exception trying to close a non opened port.
- calling callback(error) on errors.
- null pointer exception
@brugnara Sure, I will merge the pull request, just, please change the Error to string and I'll just merge it.