File handler fopen bugfix