Move read code under server block