Add log stats to file and modify license to LGPL