added debug log and profiling
support for passing errors up chain hierarchy