Appendix for searchtree
(Hopefully) fixed TOCTOU Race condition