More efficient event loop + add file name