fix config.sh - error handling