fixed fopen mode