Fix check for file exists.