Updated the logic so that modules do not need to exist in the file config

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>