makemetadata: add some logging and set up for running via cron