Make errorfiles to be script dependent