Putting check guard if thread already destroyed