added global head adding flag
check noMoreHead in non-root dirs
use stdout instead of stderr for showing usage information