modify gem and cap files