Added documentation for kwargs and exception handling