Using "WS_CONFIG " as env variable in all WS calls

Fixing and handling error messages