'read_saved_id' will now always close a file.
Added exception handler.
Cleaned random import.