Fix detection of file existance