LPS-52207 Encapsulate common logic and move it to TrashUtil