fix log smoothing and writing
Merge branch 'hotfix/0.4.1'