diff --git a/xroot_plugins/XrdCtaFile.cpp b/xroot_plugins/XrdCtaFile.cpp
index be8df759c4c51686a94be4d4463de4bd81a71ef1..5a58900d8a25612d1c44d47532af83122b6f62b8 100644
--- a/xroot_plugins/XrdCtaFile.cpp
+++ b/xroot_plugins/XrdCtaFile.cpp
@@ -429,13 +429,13 @@ void XrdCtaFile::addLogInfoToResponseRow(std::vector<std::string> &responseRow,
 //------------------------------------------------------------------------------
 uint64_t XrdCtaFile::stringParameterToUint64(const std::string &parameterName, const std::string &parameterValue) const {
   try {
-    return stoull(parameterName);
+    return stoull(parameterValue);
   } catch(std::invalid_argument &ex) {
-    throw cta::exception::Exception(std::string(__FUNCTION__)+" - Parameter: "+parameterName+" has an invalid argument");
+    throw cta::exception::Exception(std::string(__FUNCTION__)+" - Parameter: "+parameterName+" ("+parameterValue+") has an invalid argument");
   } catch(std::out_of_range &ex) {
-    throw cta::exception::Exception(std::string(__FUNCTION__)+" - The value of parameter: "+parameterName+" is out of range");
+    throw cta::exception::Exception(std::string(__FUNCTION__)+" - The value of parameter: "+parameterName+" ("+parameterValue+") is out of range");
   } catch(...) {
-    throw cta::exception::Exception(std::string(__FUNCTION__)+" - Unknown error while converting parameter: "+parameterName+" to a uint64_t");
+    throw cta::exception::Exception(std::string(__FUNCTION__)+" - Unknown error while converting parameter: "+parameterName+" ("+parameterValue+") to a uint64_t");
   }
   return 0;
 }