added functions WriteBasinOutput and WriteTimeOutput, killed bugs