Dynamically allocate mem for filename
Destroy transport on error
delete filename after reading file
Dynamically create module filename
Move transport.h to the first line
add stdlib for free()
Check if transports work

If the transport breaks then raise an exception. Currently the
exception is caught in main and nothing is done. I'm not entirely what
needs to be done.
Fix stacking manipulation in transport error case