fixed daemon and file descriptors