The code itself is good if it does what you want.
"r" requires that the file already exists (it will not create it for you), so you need to make sure that the path is correct. Is the path to the desktop correct, and not on another drive, etc.
A permission error will occur if it was executed by a user other than "ste", or, of course, if something changed the permissions on this file path as a way to prevent access.
source share