Improve robustness in random seed file handling.