Index: cpp/frams/Makefile-SDK-files
===================================================================
--- cpp/frams/Makefile-SDK-files	(revision 298)
+++ cpp/frams/Makefile-SDK-files	(revision 299)
@@ -31,5 +31,5 @@
 F0_VARIANTS_OBJS=frams/_demos/f0_variants_test.o frams/virtfile/stringfile.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o   $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
 
-LOADER_TEST_OBJS=frams/_demos/genotypeloader.o frams/_demos/loader_test.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile-autoinit.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
+LOADER_TEST_OBJS=frams/_demos/genotypeloader.o frams/_demos/loader_test.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
 
 GENOCONV_TEST_OBJS= frams/_demos/genoconv_test.o frams/_demos/printconvmap.o frams/errmgr/stdouterr.o frams/virtfile/virtfile.o  $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
@@ -55,9 +55,9 @@
 NEURO_LAYOUT_TEST_OBJS= frams/_demos/neuro_layout_test.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GENMAN_SDK_OBJS) frams/canvas/nn_layout_model.o frams/canvas/nn_simple_layout.o frams/canvas/nn_smart_layout.o
 
-GEOMETRY_INFO_TEST_OBJS=frams/_demos/geometry/info_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile-autoinit.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
+GEOMETRY_INFO_TEST_OBJS=frams/_demos/geometry/info_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
 
-GEOMETRY_SURFACE_TEST_OBJS=frams/_demos/geometry/surface_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile-autoinit.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
+GEOMETRY_SURFACE_TEST_OBJS=frams/_demos/geometry/surface_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
 
-GEOMETRY_VOLUME_TEST_OBJS=frams/_demos/geometry/volume_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile-autoinit.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
+GEOMETRY_VOLUME_TEST_OBJS=frams/_demos/geometry/volume_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
 
-GEOMETRY_APICES_TEST_OBJS=frams/_demos/geometry/apices_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile-autoinit.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
+GEOMETRY_APICES_TEST_OBJS=frams/_demos/geometry/apices_test.o frams/_demos/geometry/geometrytestutils.o frams/_demos/genotypeloader.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS) $(GEOMETRY_OBJS)
Index: cpp/frams/_demos/geometry/geometrytestutils.cpp
===================================================================
--- cpp/frams/_demos/geometry/geometrytestutils.cpp	(revision 298)
+++ cpp/frams/_demos/geometry/geometrytestutils.cpp	(revision 299)
@@ -6,4 +6,5 @@
 
 #include "../genotypeloader.h"
+#include <frams/virtfile/stdiofile.h>
 #include <math.h>
 #include <stdio.h>
@@ -119,4 +120,5 @@
 {
 	srand(time(NULL));
+	StdioFileSystem_autoselect stdiofilesys;
 	
 	if ((argc == 3) && (strcmp("-l", argv[1]) == 0))
@@ -178,4 +180,5 @@
 {
 	srand(time(NULL));
+	StdioFileSystem_autoselect stdiofilesys;
 	
 	if ((argc == 3) && (strcmp("-l", argv[1]) == 0))
@@ -215,5 +218,5 @@
 		"GENO_ID - either genotype name or index (1-based)\n"
 		"DENSITY - minimal number of samples per unit\n"
-		"SHAPE - 1=ellipsoid, 2=cuboid, 3=cylinder, others or none=random",
+		"SHAPE - 1=ellipsoid, 2=cuboid, 3=cylinder, others or none=random\n",
 		(const char*)header);
 	return 1;
Index: cpp/frams/_demos/loader_test.cpp
===================================================================
--- cpp/frams/_demos/loader_test.cpp	(revision 298)
+++ cpp/frams/_demos/loader_test.cpp	(revision 299)
@@ -4,4 +4,5 @@
 
 #include "genotypeloader.h"
+#include <frams/virtfile/stdiofile.h>
 
 /**
@@ -24,4 +25,5 @@
 
 long count=0,totalsize=0;
+StdioFileSystem_autoselect stdiofilesys;
 MiniGenotypeLoader loader(argv[1]);
 const char* selected=(argc<3)?NULL:argv[2];
Index: cpp/frams/virtfile/stdiofile-autoinit.cpp
===================================================================
--- cpp/frams/virtfile/stdiofile-autoinit.cpp	(revision 298)
+++ 	(revision )
@@ -1,20 +1,0 @@
-// This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
-// See LICENSE.txt for details.
-
-#include "stdiofile.h"
-
-static StdioFileSystem filesys;
-
-class StdioFile_autoinit
-{
-public:
-StdioFile_autoinit()
-	{
-   //StdioFILE::setStdio();
-	VirtFILE::selectFileSystem(&filesys);
-	}
-};
-
-
-static StdioFile_autoinit ai;
Index: cpp/frams/virtfile/stdiofile.h
===================================================================
--- cpp/frams/virtfile/stdiofile.h	(revision 298)
+++ cpp/frams/virtfile/stdiofile.h	(revision 299)
@@ -107,4 +107,12 @@
 };
 
+class StdioFileSystem_autoselect: public StdioFileSystem
+{
+public:
+StdioFileSystem_autoselect()
+	{
+	VirtFILE::selectFileSystem(this);
+	}
+};
+
 #endif
-
