In file_writer.py declare some methods as @staticmethod. Add methods and tests.