Bookdown: memory issues upon compilation

Hi

_main.Rmd is not deleted if a compilation try fails. This is the consequence not the cause of the error 9 message I get.
I issue a "system('rm -f _main.Rmd')" call before every compilation attempt.