The mechanism of BAM-assisted OMP folding