change logic to account for case where file doesn't exist