I2C occasional freeze and buffer size

I’m communicating with a sensor over I2C and occasionally the Photon is freezing when I first try to write a byte to the sensor. Resetting the Photon fixes the freeze but every 5 or 6 resets it happens again.

Is there anything that could cause this, hardware or firmware?
Is there a check I can perform in my code to stop this from happening?

I also need to increase the size of the I2C buffer to 258 bytes. Are there any possible issues or things to look out for when doing this? Is editing and rebuilding the particle firmware the only way to do this or is there an easier way?