ignore files ending with ~
adding query find with toArray