Extract getting file based on env to its own method