Added more logic, for an independet printf (only for debugging purpose)