Error compiling for board Arduino/Genuino Uno

I am getting the following error message when compiling a program on my Arduino IDE. This does not happen when compiling the given example programs in the IDE

The error message is as follows :

Arduino: 1.8.5 (Windows 10), Board: “Arduino/Genuino Uno”

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware
C:\Program Files\Arduino\hardware -tools
C:\Program Files\Arduino\tools-builder -tools
C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries
C:\Program Files\Arduino\libraries -libraries
C:\Users\mahim\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path
C:\Users\mahim\AppData\Local\Temp\arduino_build_361527 -warnings=none -build-cache
C:\Users\mahim\AppData\Local\Temp\arduino_cache_227236 -prefs=build.warn_data_percentage=75
C:\Program Files\Arduino\hardware\tools\avr
C:\Program Files\Arduino\hardware\tools\avr
C:\Program Files\Arduino\hardware\tools\avr -verbose
C:\Users\mahim\OneDrive\Documents\Arduino\3potpass\3potpass.ino: The system cannot find the file specified.

Error compiling for board Arduino/Genuino Uno.

This error is caused by using Arduino 1.8.5 or older with files stored in Windows OneDrive. The solution is to update to Arduino IDE 1.8.6 or newer. You can download the new version of the Arduino IDE here: