Adding sync-function and include correct image file correctly