Manual testing for #209
Manual testing for #211
Fix issue #209
Code formatting
Fix logging