Updated to use lib/log not just log in the main script