Fix return code on config callback
Add support for STDIN listening