added logging statements, which might help showing the whole flow
refactored to code a bit
Merge branch 'master' into feature/updating-logging-messages
Merge branch 'feature/updating-logging-messages'