move log catch to main app.js