Removed some unnecessary log statements.
Made test for is_loaned_out more robust and added some log statements.