update parsing logic and file creation