debugging, needs to work for missing files