reorder file structures
add exception handler for send