CB-5020 - File plugin should execute on a separate thread

Moved all functions so that everything except basic arg parsing is threaded.