check var is set before using
use better method to module path