Partially completed, added logging. TODO: Failure detection may exceed 5
seconds, fix this