fixed indent and fclose