use the valid layer name as file name on the disk
Merge pull request #1716 from simod/issue-1713

use the valid layer name as file name on the disk, fixes #1713