Refactored methods from filereceiver into utils