inital logic for timer, file reading, and packet processing