add sleep and logging on error

Signed-off-by: Stephen Gran <stephen.gran@piksel.com>