Make the String input argument for the path as final to prevent mutability

Reassigned the path input argument to local variable to prevent accidental mutability  to
help reduce re-assignment error by not modifying input argument to be used as local variable.

The patch also clean some potential code confusion:
1. Remove useless return statement in the catch when it is the end of method.
2. Remove local variable for fid and just return directly since it is protected by
   try-catch that we do not need to handle due to IO issue.
Hi @haoyuan, I was thinking to add this change to wrap Thirft exception with IOException. But since it is changing the behavior I will take out the fix from this PR to make it clean.
Sorry about the mix behaviors in this PR.