Fixes #3197: add the possibility to enforce file content only at its creation