Added debugging information to fetch script

We should test this with metadata at (or close to) the maximum size limit, in case this might overflow some length limitation in bash, logger, syslog, etc. If it works at roughly the maximum size, this PR LGTM.