Few variable names renamed.
equalFile replaced with newerFile.
Minor: Closing logger and file due to fd leaks.