Fix bug in getLatestAttachTime.
Fix format in debug print.