usage script
check if resource returned by server is image
add profiling
define methods main and notify