Bug fix: fortran does not gurantee the evalution order for logical experssion.
Minor change of output format