Added some debug checks + stub (useless) rescue function. Use only for
debug