Add error handling and emission on no connection to module

fixed