Fix fileiothread stuck