Improved comments.
Fixed bug that corrupted record files.