another bugfix for issue #7: before it failed to create a new file with a valid path.