Added basic diagnostic functions