edit and exists file testing