Daemon error checking fix