add stat() for files
raise Exception on remote command failure