added required headers and build output after fail