heavily revised & greatly simplified time_files.py -KL