increase robustness
increase robustness

add fflush to write files in case some layer future layer crashes the program
PrincetonVision/marvin,PrincetonVision/marvin,PrincetonVision/marvin,PrincetonVision/marvin