Issue #1 added the possibility to define the file_name with a function.
Merge pull request #2 from philippze/master

Issue #1. I added the possibility to define the file_name with a function.