Added better error handling when namespace are missing