Added debug log lines into catch statements

Should help greatly with debugging. Only did the root folder so far.