Add method for checking if a file exists.