accounted for the possibility of a file not existing