checking file owner before changing