Fixed bugs in hooks, updated example app, improved logger style