Refactored attachment file path construction. Created main()