writes files on every click + refreshing dir
can now use A key to go back one image