Added error checking and increased refresh rate