checking if file exists before setting background image