Not generate empty files

Change-Id: Ic23e357bd8f483c9b1d1ceb8f9bb4739e471d0e5