small improvements
import improvement: optionnally don't throw an exception
changed warning handling