Added a background-thread calling check to the execute method for tasks