Thanks Derby, Everything works as long as I do not ask it to write the output value to a DB instead of another file and/or stdout. The minute I uncommented those blessed lines... things start acting up.