checks for file existence