Include error checking for remote commands, fix #4