separate dep and ast file creation function