And also - seeing WinMain in your code I thinkg you are creating GUI application
In this case you don't need main function
create another function with the code that tests the existence of the file
return true if it exists and false - otherwise
Call it for each file you need to check and decide if you want to continue based on the return value