Clean up sonosite file pointers
Fix retry bug