Completion checking

Safer thread safe sorting

Error messages