It's only a guess, but i think you web server is not allowed to write to there. Are you sure that the readimage works?
Your path V looking like a windows mapped network drive. Maybe you webserver-process doesn't have that mapped drive.
I could be also a problem with the relative path in writeimage. This could be: \img. Normally "c:\programm files*" where no write access is allowed.