fix scp error and change function name so as to not confuse with task