exit in case of a faulty address
added debug messages + locking