Updated suspendTask method