Method fprintf for threshold criterion