commit 64e2408dcabdcca75adf29eecbe0c2d91e0b46fc
Author: David Sorber <david.sorber@gmail.com>
Date:   Sun Sep 9 09:45:01 2018 -0400

    Fix minor formatting bug and improve error message handling.

diff --git a/software/photo_compress_archiver/PhotoCompressArchiver.cc b/software/photo_compress_archiver/PhotoCompressArchiver.cc
index 144cf1a..a2cfe21 100644
--- a/software/photo_compress_archiver/PhotoCompressArchiver.cc
+++ b/software/photo_compress_archiver/PhotoCompressArchiver.cc
@@ -23,13 +23,13 @@
 #define WRKR_OUT_ERR(msg) {                                                   \
     std::lock_guard<std::mutex> lock(m_output_mutex);                         \
     std::cerr << "T[" << std::setw(2) << tid << "] " << BOLD << RED           \
-              << "ERROR: " << msg << std::endl;                               \
+              << "ERROR: " << ENDC << msg << std::endl;                       \
 }
 
 // Helper functions
 std::string _format_num_bytes(uint64_t num_bytes)
 {
-    const uint64_t tera = (1024 * 1024 * 1024L);
+    const uint64_t tera = (1024 * 1024 * 1024 * 1024L);
     const uint64_t giga = (1024 * 1024 * 1024L);
     const uint64_t mega = (1024 * 1024L);
     const uint64_t kilo = 1024L;
@@ -168,9 +168,9 @@ int PhotoCompressArchiver::execute()
     // Print out message if any errors were found
     if (m_errors.size() > 0)
     {
-        std::cout << BOLD << RED << "NOTE: errors were encountered processing "
-                  << "the following " << m_errors.size() << " files:\n" << ENDC
-                  << std::endl;
+        std::cout << BOLD << RED << "\n\nNOTE: errors were encountered "
+                  << "processing the following " << m_errors.size() 
+                  << " files:\n" << ENDC << std::endl;
             
         WorkUnit* work_unit = nullptr;
         for (uint32_t idx = 0; idx < m_errors.size(); ++idx)
@@ -301,7 +301,8 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
             }
             else
             {
-                WRKR_OUT_ERR("the input file does not appear to be a valid "
+                WRKR_OUT_ERR("the input file \""  << work_unit->m_path 
+                              << "\" does not appear to be a valid "
                              "packjpg (.pjg) file even though its filename "
                              "suggests it is!\n")
                 m_errors.push_back(work_unit);
@@ -317,7 +318,8 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
             }
             else
             {
-                WRKR_OUT_ERR("the input file does not appear to be a valid "
+                WRKR_OUT_ERR("the input file \""  << work_unit->m_path 
+                              << "\" does not appear to be a valid "
                              "JPEG (.jpg) file even though its filename "
                              "suggests it is!\n")
                 m_errors.push_back(work_unit);
@@ -333,8 +335,10 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
                                                       &out_size, message);
         if (!rc)
         {
-            WRKR_OUT_ERR("An error occurred during the compression"
-                          << "/decompression operation: " << message << "\n")
+            WRKR_OUT_ERR("An error occurred during the " 
+                          <<  (m_decompress ? "decompression" : "compression")
+                          << " operation on " << work_unit->m_path 
+                          << ": " << message << "\n")
             m_errors.push_back(work_unit);
             continue;
         }
diff --git a/software/photo_compress_archiver/PhotoCompressArchiver.hh b/software/photo_compress_archiver/PhotoCompressArchiver.hh
index 941bb41..f7cc0b2 100644
--- a/software/photo_compress_archiver/PhotoCompressArchiver.hh
+++ b/software/photo_compress_archiver/PhotoCompressArchiver.hh
@@ -24,7 +24,7 @@ const std::string RED("\033[31m");
 const std::string YELLOW("\033[33m");
 const std::string PURPLE("\033[35m");
 
-const std::string version("v0.3.1");
+const std::string version("v0.3.2");
 
 const boost::regex JPEG_REGEX("^.+\\.(jpg)|(jpeg)$", boost::regex::icase);
 const boost::regex PJG_REGEX("^.+\\.pjg$", boost::regex::icase);
