Fix output when no argument is supplied

Also use directly `main` on tests