move removemodel after deleting all edges. change the format of the logging