Added the file and image handling stuff