open not fopen and other mistakes