Created new function to check presence of files