Log stderr and stdout to file

Depends on #32 
Similar to https://github.com/cargomedia/socket-redis/blob/master/lib/utils.js#L15

Add some debug logging.
Is there a reason to name this function?