Moved to unsafe fopen for gcc compatibility