Added more context information in error messages