fixes #2: allow mode specification for file creation interfaces