Application separation (sandboxing)

Improved error handling and logging in sandboxed application