Declare $log array first