added file attach function to connection class

and deleted bin, gen folder