implemented working signals & PID file in daemon