Hello Ashwin,
if it working for file stored in locally and not for shared drive then it may be access issue.
Are you able to open that file manually from shared path?
and the error message which you have post is the full one or there are few more line with that message?
------------------------------
Neeraj Kumar
Software Engineer
------------------------------