fixed "struct stat" usage in main, cli and ext/standard