correct bug when giving non ok file