added dispose HttpClient. and move ErrorActionPreference inside Command