added salary
fixed warning on fclose statement