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
@emilsedgh done. I think we should talk a bit and do a branch where we can do a huge refactor fixing what we said tomorrow. :+1: