Added $market and $file better.

Added $market and used $file where it could be used.