Lost samples, hanging workers fix

Fixed lost samples error due to
a) samba file overwriting not working
b) workers being disconnected when messages are sent

Fixed (?) hanging workers due to error stream not being read which created a deadlock