What permission does the user have who's running that code?
Based on MS Technet
Only members of the sysadmin fixed server role can execute sp_OASetProperty.
If you're not a member of the sysadmin role, this might be the reason for not creating the file.