made prepareBlock return error messages