Flie refactor

Pull request for challenge [30047592](https://www.topcoder.com/challenge-details/30047592/?type=develop)