Update applyMap.js

Adding debugging