Now prints filename to STDERR
Fixed bug with min value and max. value being equal