Graceful Closure on the RIOT