general improvements/semplification (don't need log, just redirect the output)