use System.pm for the calls instead of duplicating code.
More logging updates.