Added error checking to C_RecordStat() to prevent blakserv crashes by passing incorrect number or type of parameters