Readding support for SLEEP. Adding support for FAIL env