Fix #292: "TOCTOU"