Added a sleep, otherwise the process would be using up far too much CPU time