Add some error checking in container monitor