fixing fopen arguments