Added checks to prevent key [MODULENAME] doesn't exist error