enhance error check
fix to update mac-local script