Make socket errors non fatal.

If it is impossible to create all sockets from a list of addrinfo treat
it as success if any of sockets have been created.
Write to stat after scanning.
Fix actions output in 'stat' command.