created copyRemoteLocal.go and moved corresponding functions there