fixed make_interval
fixed check_files which had stoped working