Make file helper more general