Add method to check if file exists.