Bugfix: Also close file if fd==0.
Fix spacing.