Minor variable name refactor; `console.log` when avaiable in case of
errors