Added a return value to know the size of the written bytes in writeStream.
Added a way to set the threads in the taskqueue as daemons.