diff --git a/modules/conop/src/chemdict_tool.cc b/modules/conop/src/chemdict_tool.cc
index 0286e525ff3eb4a1cf257624533385370ad2e3db..404f50b8aa12dbd00b248a3b28dc574389787a40 100644
--- a/modules/conop/src/chemdict_tool.cc
+++ b/modules/conop/src/chemdict_tool.cc
@@ -66,6 +66,11 @@ int main(int argc, char const *argv[])
   }
   boost::iostreams::filtering_stream<boost::iostreams::input>  filtered_istream;  
   std::ifstream istream(argv[2]);
+  if (! istream.is_open()) {
+      std::cout << "Cannot open " << argv[2] << ": [Errno " << errno << "] "
+                << strerror(errno) << std::endl;
+      return 1;
+  }
   if (boost::iequals(".gz", boost::filesystem::extension(argv[2]))) {
     filtered_istream.push(boost::iostreams::gzip_decompressor());
   }
@@ -92,6 +97,11 @@ int main(int argc, char const *argv[])
   cdp.SetCompoundLib(in_mem_lib);
   cdp.Parse();
   in_mem_lib->SetChemLibInfo();
-  in_mem_lib->Copy(argv[3]);  
+  conop::CompoundLibPtr copy = in_mem_lib->Copy(argv[3]);
+  if (! copy) {
+      std::cout << "Cannot save " << argv[3] << ": [Errno " << errno << "] "
+                << strerror(errno) << std::endl;
+      return 1;
+  }
   return 0;
 }