warning light thread created.
Created a sleep method to handle try and catch