Reduced shutdown wait. Added redundant error catching