WIP: fixing errors for buildFileObjects and parseHeaders