Flexible file handing utility