fix log rotation and build