Check file existence before running it