added regexp to locator (for gif files), fixed some bugs with error handling