Added option to set number of retention days