Improved stdout/stderr printing
Simplified internal code for local commands