Close message file after parsing message headers