better stubbing for spawn
messages in error events
do not leak chunk to global scope