Added proper logging  to mailimport.