fix using '=' instead of '==' in checking fopen return value