fixed a major bug with file availability