BUG: should deal with file bundles as well