fix file attach in registration