Fixes #4 and #6. Failing to recieve on socket will not crash daemon now.