Check if variable is set before accessing, prevents grunt’s exec function from failing on a notice.
Use a custom logger so we ensure `warning` messages are sent to STDERR, and therefore are not conflicting with the success/failure message (which is what the grunt task tests for)