fixed file input methods to work with service