Adding exception to deal with non-existent files
Moving functions of transport to source file (leaving definitions on header)