bugfix: when sed failed, exit 1