Fix sample build and run
Report exceptions