fixed a precision error in the calculation of the temperature. Also fixed the order that dump file are written.