added support for remote files