BUGFIX: specifying filename argument resulted in a file with just the first letter