error in fopen: error at line 676