added test to show execption when someone tries to print in a closure

I guess this is not an expected behaviour?