Replace error logging with debug
Merge branch 'refactoring'