Updated file attachment routine for MoSync