added removal of semicolons and writing to different file after preprocessing