Correct dependecies
Refactored Utitilies class and added correct closing of resources