Checking simulations: detecting and avoiding errors and artefacts