This is incorrect. If `ps` is null, you'd still need to close `fos`. You need to rearrange the `try` block to acknowledge the existence of two resources — nesting is the usual approach.