fixed the connection error handling
fixed standards and file names