file input generalized