add possibility to define ExternalListener

this might be handy when I have a simple test app where I want to listen to the open file and open socket events