corrected output directory and errors at initialisation