used exists instead of stat