Added result type checks, unhandled exception reporting