Suddivisione remote_check in remote_detect e remote_check