added logging and maxAge