added check to see if conf file exists

Signed-off-by: Octavian Ionescu <itavyg@gmail.com>
moved functions to an external file

Signed-off-by: Octavian Ionescu <itavyg@gmail.com>
added some checks and the copy feature on first time

Signed-off-by: Octavian Ionescu <itavyg@gmail.com>