Script will process all files (recursively) from PWD and write output to './output'
Code could be cleaned, but all functions seem to work