loop files in the background