fix bug when entering quit before loading image, the console will print out sucessfully loading message