I would prefer only one point of return here. The debug messages may be not that significant in some cases. You should resort them starting from line 94.