This cursor not permanent why ?
Any errors on the output? If not, you could try adding print statements to see where the issue could lie?