There's no mistakes, Ubuntu is just confusing you with its file name detection. Your core.gz is fine, it just happens to be the same name Ubuntu uses for crash reports.
Also, bootlocal.sh does not run interactively, so you likely won't see that echo. E...
Also, bootlocal.sh does not run interactively, so you likely won't see that echo. E...