Added additional debug lines to signalled functions in models.py