Making sure files exist before trying to access them.