Added logging and removing all print to console