Remove if-statement from file fetch