[JY] refactor Copy-FileRemote and fix health-check