setting moduelName before throwing error for better reporting
better errors