Making some parameters final.
Fixed script instument and  output writer.