Improved the performance of saveBin().