Added printf and setting local to null in beginning