Fixed pull request comments on on ad667a4

Style changes for consistency.
Added a check to only open local files.