Fixed duble generation of files