Flushed buffer after logging
Debug version of restrictive bitwise permutation