Handeling log rotation

Cool thanks.