fix open for mode 'existing'