Modifying module error handling to be more informative.
Adding more parameters, error handling.