Better processing of close operations, stats tracking, error handling.