in reply to Dynamically Create a file
So either /usr/anil/scripts/ActData doesn't exist (spelling?) or it is not writable by you. Or this code path is never executed (in a supposedly bigger script).