buildtool: catch CalledProcessError for better diagnostics