Fixed error when serverFile is not null but localFile is