First version that works on single files