Escaping problem with \$arch
Better error handling