logging err.stack on catch when possible
(e.g. avoiding a ReferenceError on the whole project without
even a clue on the file at fault)
replacing the undefined 'path' variable by 'reqpath'