You don't want to call tcp.stop() here, you are in init() so there is no TCP stream being processed.

You want to use:

```
module_options['error'] = "Your error message"
return module_options
```