add modification check to file action.