Fix build for OSX
Do not print stack trace on release build
Closures