added jpg folder check