on seccond though, simply changing this line to 

`if (err && err.status !== 404) {`

would take care of this