added a delay to open a new file