added proper exception handling to hardware daemon