added initialize text file functionality