improved loggin. added daily log rotation.