more qa. die on errors and use gentoo functions