Added check that file exists