replace puts with logger statements