Check mcrypt function return values.
Check more return values.