title: c# exe throwing error only when run through task scheduler
body: <p>I have an exe that developed on visual studio.<br>
  When we run it on the server, it will execute with out any issues.<br>
  But when I tried to execute it through Task scheduler, it is not running.<br>
  Please find the below error message from event viewer.<br>
  Please help me to resolve the issue</p>
  
  <pre>
  Framework Version: v4.0.30319
  Description: The process was terminated due to an unhandled exception.
  Exception Info: System.IO.DirectoryNotFoundException
  Stack:
     at System.IO.__Error.WinIOError(Int32, System.String)
     at System.IO.Directory.InternalCreateDirectory(System.String, System.String, System.Object, Boolean)
     at System.IO.DirectoryInfo.Create()
     at CentralMarketTransfer.HEB.CentralMarketTransfer.util.SimpleLogging.LogMessageToFile(System.String)
     at CentralMarketTransfer.HEB.CenteralMarketTransfer.main.ProjectMain.Main(System.String[])
  </pre>