More effective searching for available file

- Credits: jreidinger