Fix file creation
More tests