Added alot of logging