Reimplement custom warnings with overwriteWarnings flag