stop the same file getting processed multiple times if there is no content