Add CLEAR_JOBs to the queue before getting push logs
Added error handling in the threads.
Used the threadsafe logging module for printing error messages and info.