Move input checking to a separate thread