Added error handling for refreshremotes