Generalized error recovery
Added support for afplay