Changed logging and print statements.