fix init(): correctly fopen/ fclose