Added more functionality if exception caugth