As long as the
preparations were done shortly before immersing (and not hours before), and you inspected your body immediately prior to immersion, you may assume that the nail cracked after you had already immersed. Your
tevilah remains
valid.
Please feel free to get back to us with any further questions.