start working on sleep.html, add error handler