improved warnings and checks