[CLOUD-30] Improve ignorefile logic