Changed logger.error to logger.warn