Improved code quality using finally blocks.