Output file can be created (with some minor errors)