modified Parse function to allow an optional file path