prepare the statement inside the begin / rescue block