Move example file to the examples directory
Add overflow exception
add crashed flag