Added sleep and panic

Added sleep and panic