updated indentation and added a log to show that on ready happens once