update some error messages
replace new line characters with <br> in error messages
stop creating the same exception twice in loading samples
loads existing samples to get correct error messages