close after file open error