Add enforced pipe mode, for cases where isatty check fails
Fix bad buffer allocations