Clarified method definition for isFileOpen.
Removed unnecessary old code and added comments.