Wait until file gets end before deeming file done