Fixed the generation of code in a single file.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #288 from ddobrev/master

Fixed the generation of code in a single file