scan the whole block
Initial refix 'di' for osx, add missing newline in 'psi'